The present invention relates generally to scanners, and in particular, but not exclusively, to automatic gain adjustment during scanning.
Bar code scanners typically function by generating a thin beam of light and scanning the beam across a symbol to be read. The symbol typically comprises a plurality of alternating light (usually white) and dark (usually black) areas; the best-known symbols are bar codes, where the light and dark areas are formed by a white background with alternating black bars superimposed thereon. As the spot created by the projection of the beam onto the symbol travels across the symbol, it crosses the alternating light and dark areas and a portion of the light hitting the symbol is reflected back into the scanner. More light is reflected from the light areas than from the dark areas, so the optical energy reflected back into the scanner will consist of a signal containing a series of peaks corresponding to the light areas and valleys corresponding to the dark areas. Processing circuitry within the scanner then converts the received optical signal into an electrical signal and proceeds to decode the peaks and valleys in the signal, thus extracting the information contained in the symbol.
FIGS. 1A and 1B illustrate a common problem that occurs when a scanner attempts to read a flat symbol. All scanners have a so-called xe2x80x9cscan windowxe2x80x9d within which the symbol must be placed if the scanner is to correctly read it. In addition, scanners usually have a fixed focal length and depth of field, depending on the optics used in the scanner. Thus, not only must the symbol be within the scan window, but it also must be within a prescribed distance of the scanner to be read. FIG. 1A illustrates a typical scanner setup, with the scanner 100 positioned at the focal distance f from the label 102 containing a symbol to be read. When the scanning beam 104 is approximately in the central portion of the symbol 102, it is incident on the symbol at a perpendicular angle; in this case, a substantial amount of the optical energy of the beam is reflected back to the scanner and a small portion is absorbed by the symbol. As the beam scans and nears the edges of the scan window, it emerges from the scanner at an angle xcex8, meaning that the angle of incidence of the beam on the symbol is also xcex8; thus, xcex81=xcex82 as shown. If the angle of incidence on the symbol is xcex8, then basic physics dictate that the angle of reflection from the symbol must also be xcex8. Thus, of the total optical energy contained in the incident beam, a certain portion is absorbed, a certain portion is reflected back toward the scanner, and a certain portion 106 is reflected into free space. As the angle xcex8 increases, the proportion of the optical energy reflected back toward the scanner decreases, while the proportion 106 of the optical energy reflected into free space increases. As a result, the amount of optical power received at the scanner drops off significantly at the edges of the symbol, making it difficult to adequately scan, capture and decode the information contained near the edges of the symbol. The problem is particularly acute when the scanner must operate in very close quarters and must therefore be placed very close to the symbol. In this case, the focal distanced is substantially shorter than that shown in FIG. 1A, meaning that the angles xcex8 are substantially larger, and that the return power at the edges of the symbol are substantially smaller. Thus, in scanners having a short focal length and operating near the symbol it is particularly challenging to properly read the edges of the symbol. FIG. 1B illustrates the effect of the above phenomenon on the optical response of the scanner.
FIG. 1C illustrates another phenomenon that affects the optical response of the scanner. In addition to the fact that less optical energy is reflected from the symbol toward the scanner at higher angles xcex8, the optical response is also affected by the light-collection properties of the optical detector within the scanner. Specifically, the optical energy collected by an optical detector depends on the projected area of the detector in the direction from which the energy is collected. Thus, if a beam 110 is incident on a detector 112 at a normal angle (i.e., xcex8=0 degrees), then the detector 112 collects the optical energy over the entire area A0. If instead a beam 114 is incident on the detector 112 at a non-zero angle xcex8, then the detector only collects energy over the projected area Axcex8, which is substantially smaller than the projected area A0. As the angle xcex8 increases, the area Axcex8 gets smaller, and thus the area over which the detector can collect optical energy decreases. This phenomenon factors into the optical response curve 108 shown in FIG. 1B.
Automatic Gain Control (AGC) is an approach used in the prior art to compensate for varying distances between the symbol and the scanner. With existing AGC systems the gain of the optical detector is changed from scan to scan, depending on the distance between the scanner and the symbol. Once a gain value is selected for a particular scan, it stays constant at that value throughout the particular scan. Thus, when the symbol is near to the scanner the gain can be adjusted downward, whereas when the symbol is farther from the scanner, the gain can be adjusted upward. The shortcoming of this approach is that although the gain can be varied from scan to scan, only a single gain value can be employed throughout any given scan. In other words, there is no way of adjusting the gain during a scan. This approach therefore cannot be used to address the problem of compensating for reduced optical response at the edges of a scanned symbol. In addition, even if a standard AGC could be adapted to compensate for gain changes during a scan, they would be much too slow.
One way of dealing with the poor optical response near the symbol edges is discussed in U.S. Pat. No. 5,701,003 to Chisholm et al (xe2x80x9cChisholmxe2x80x9d). The approach taken in Chisholm to improve optical response of the scanner at the edges of the scan window is to increase the optical power of the laser in the scanner near the edges of the scan window while reducing the power of the laser near the middle of the scan window. Because the angles of incidence and reflection of the scanning beam continue to be the same at the edges of the scan window, the proportion of optical energy reflected back to the scanner at the edges of the scan window continues to be the same. Since the power of the incident beam is higher, however, the optical power reflected back to the scanner is higher. The net effect of the Chisholm approach is that the optical response curve is xe2x80x9cflattened,xe2x80x9d so that the optical response is more nearly constant across the width of the scan window.
Despite the apparent elegance of the approach taken in Chisholm, it has several important disadvantages. First, increasing the power of the laser near the edges of the symbol has serious safety implications because the increased laser power can pose a danger to the eyes of the scanner operator or other bystanders, and when the beam nears the edge of the symbol more of the optical power is likely to be reflected into someone""s eyes. Second, using the laser at a higher power output and continually cycling the laser between low and high power states will decrease the lifetime of the laser and the scanner, ultimately driving up costs to the end user. Finally, the higher power output of the laser means additional power consumption and additional heat dissipation problems. Power consumption and heat dissipation both can lead to additional expense in making and using the scanner, as well as inconvenience to the user who, in the case of a hand-held scanner, must carry the additional weigh of heat sinks, etc, used to dissipate the heat created by the additional power consumption of the laser.
Given the shortcomings in methods to improve scanning near the edges of the scan window, there is a need in the art for an improved method of improving the optical response of scanners.
The disclosure describes an apparatus and method for automatic gain control during scanning. The apparatus comprises an optical detector to receive an optical signal reflected from a symbol positioned within a scan window by an optical beam scanned from a leading edge of the scan window to a trailing edge of the scan window; and a processor coupled to the optical detector to adjust the gain of the optical detector during the beam scan. The process comprises receiving an optical signal using an optical detector, wherein the optical signal comprises optical energy reflected from a symbol positioned in a scan window as an optical beam scans from a leading edge of the scan window to a trailing edge of the scan window, and adjusting the gain of the optical detector during receipt of the optical signal. A calibration process is disclosed comprising calibrating the optical detector to obtain a plurality of gain corrections, each gain correction corresponding to a different position between a leading edge and a trailing edge of a scan window, and storing the plurality of gain corrections.